1. Field of the Invention
The present invention relates to an inference system which adopts knowledge engineering techniques such as production rule or frame, more particularly to a method and apparatus for inference which is capable of effectively searching a huge amount of knowledge information.
2. Description of the Prior Art
Various kinds of diagnosing and guidance systems with capabilities that rival those of the experts in the field have been manufactured in recent years by the use of an inference system that employs knowledge engineering techniques. As an example of such a system one may mention the medical diagnosing system which displays automatically the name of the corresponding disease, the diagnosing method, and the like, upon inputting through the terminal of the current symptoms by the doctor. The part which corresponds to the "human knowledge" (this will be referred to as the knowledge base) that is to be used in these systems as the data base is described in a form such as a production rule or a frame, to be managed separately and independent from the flow of controls for the entire system. By arranging the knowledge base to be independent in this manner, one inference system may be made operative in a variety of applied systems by a simple exchange of the knowledge base. Here, a knowledge base is composed of numerous units called knowledge units. A knowledge base is the so-called individual knowledge information, and the form for accumulating it in a system is the production rule, the frame, or the like.
What is meant by the production rule is the "If . . . , then . . . " rule, for example, such knowledge as "If it is a bird, then it flies." or "If it is a sparrow, then it is a bird." In this case, when a question "Does a sparrow fly?" is asked, an answer "A sparrow flies." will be inferred from the above two production rules by syllogism.
In addition, a frame is what represents a knowledge declaratively in terms of a superior frame and an inferior frame. For example, in the superior frame of an index word "a girl," there may be housed knowledges "human being," "height," and "weight=(height-100).times.0.9," while in the inferior frame of an index word "Hanako," knowledges "a girl" and "a height of 170 cm" may be housed. Then, if a question "What is the weight of Hanako?" is input by the user, then the knowledge on the "weight" in the superior frame is called out to infer an answer of "63". Therefore, in developing an inference system, building up of useful knowledge bases (knowledge units) will play a key role which corresponds to the conventional work of preparing a program. In other words, the usefulness of an inference system may be considered to depend on the quality and quantity of its knowledge bases. However, in these systems, as the quantity of the accumulated knowledge bases increases, the execution speed (inference speed) of the system as a whole is decreased necessarily. This is due to the fact that a search by the inference system of the knowledge units is carried out by the use of the pattern matching of the arrays of symbols. However, the use of a huge amount of knowledge was inevitable for the construction of a useful inference system so that its tradeoffs with the execution speed has been a matter of concern.